home *** CD-ROM | disk | FTP | other *** search
- on countem
- global wnum, rewardlist, TRIAL, bugstatus, gametwolevel, bugcount, direction, mysound, afterhint
- set afterhint to "presto"
- if count(rewardlist) = 0 then
- set rewardlist to [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]
- end if
- set qq to 0
- repeat with nums = 1 to 10
- if sprite (10 + nums) intersects 3 then
- setAt(bugstatus, nums, 1)
- else
- setAt(bugstatus, nums, 0)
- end if
- if getAt(bugstatus, nums) = 1 then
- set qq to qq + 1
- end if
- end repeat
- if qq = wnum then
- if (gametwolevel = 2) and (TRIAL < 3) then
- set othercast to getAt(rednumcast, wnum + 1)
- set finalcast to getAt(numbercast, wnum + 1)
- set the castNum of sprite 47 to othercast
- updateStage()
- repeat with xxx = 1 to 5
- set the ink of sprite 47 to 4
- updateStage()
- set the ink of sprite 47 to 0
- updateStage()
- end repeat
- end if
- if not (TRIAL > 3) then
- set mysound to "Small Crowd Cheering"
- play frame "play audio no mouth"
- end if
- play frame "close door"
- if TRIAL <= 3 then
- set xxx to random(count(rewardlist))
- set rewardanim to "Reward" & getAt(rewardlist, xxx)
- deleteAt(rewardlist, xxx)
- go(rewardanim)
- else
- go("main")
- end if
- else
- set TRIAL to TRIAL + 1
- if qq < wnum then
- set bugcount to "lessthan"
- else
- set bugcount to "greaterthan"
- end if
- if gametwolevel = 1 then
- Level1Wrong(qq)
- else
- if gametwolevel = 2 then
- Level2Wrong(qq)
- else
- Level3Wrong(qq)
- end if
- end if
- if afterhint = "main" then
- play frame "close door"
- end if
- go(afterhint)
- end if
- end
-
- on Level1Wrong qq
- global wnum, TRIAL, direction, mysound, numbercast, rednumcast, afterhint
- if TRIAL = 1 then
- play frame "Hint1"
- else
- if TRIAL = 2 then
- if qq < wnum then
- play frame "Hint2.2"
- else
- play frame "Hint2.1"
- end if
- else
- if TRIAL = 3 then
- if qq < wnum then
- play frame "Hint2.2"
- else
- play frame "Hint2.1"
- end if
- set othercast to getAt(rednumcast, wnum + 1)
- set finalcast to getAt(numbercast, wnum + 1)
- set the castNum of sprite 47 to othercast
- updateStage()
- repeat with xxx = 1 to 10
- set the ink of sprite 47 to 4
- updateStage()
- set the ink of sprite 47 to 0
- updateStage()
- end repeat
- countbugs()
- set mysound to "put " & wnum
- play frame "Hint3.size"
- else
- if TRIAL > 3 then
- play frame "Hint3"
- set mysound to "now" & wnum
- play frame "Hint3.size"
- correctbugs()
- countbugs()
- set afterhint to "main"
- end if
- end if
- end if
- end if
- end
-
- on Level2Wrong qq
- global wnum, TRIAL, direction, mysound, numbercast, rednumcast, afterhint
- if TRIAL = 1 then
- play frame "Hint1"
- else
- if TRIAL = 2 then
- if qq < wnum then
- play frame "Hint2.2"
- else
- play frame "Hint2.1"
- end if
- if direction = 1 then
- play frame "level 2.missing"
- else
- play frame "level 2.next"
- end if
- else
- if TRIAL = 3 then
- if qq < wnum then
- play frame "Hint2.2"
- else
- play frame "Hint2.1"
- end if
- set othercast to getAt(rednumcast, wnum + 1)
- set finalcast to getAt(numbercast, wnum + 1)
- set the castNum of sprite 47 to othercast
- updateStage()
- repeat with xxx = 1 to 10
- set the ink of sprite 47 to 4
- updateStage()
- set the ink of sprite 47 to 0
- updateStage()
- end repeat
- countbugs()
- set mysound to "missing" & wnum
- play frame "Hint3.size"
- else
- if TRIAL > 3 then
- play frame "Hint3"
- set mysound to "now" & wnum
- play frame "Hint3.size"
- correctbugs()
- countbugs()
- set afterhint to "main"
- end if
- end if
- end if
- end if
- end
-
- on Level3Wrong qq
- global wnum, TRIAL, direction, rightsprite, mysound, numbercast, rednumcast, afterhint
- if TRIAL = 1 then
- play frame "Hint1"
- else
- if TRIAL = 2 then
- if qq < wnum then
- play frame "Hint2.2"
- else
- play frame "Hint2.1"
- end if
- play frame "level3." & direction
- else
- if TRIAL = 3 then
- if qq < wnum then
- play frame "Hint2.2"
- else
- play frame "Hint2.1"
- end if
- set othercast to getAt(rednumcast, wnum + 1)
- set finalcast to getAt(numbercast, wnum + 1)
- set the castNum of sprite rightsprite to othercast
- updateStage()
- repeat with xxx = 1 to 10
- set the ink of sprite rightsprite to 4
- updateStage()
- set the ink of sprite rightsprite to 0
- updateStage()
- end repeat
- countbugs()
- set mysound to "Hint Level 3 (" & direction & " " & wnum & ")"
- play frame "Hint3.size"
- else
- if TRIAL > 3 then
- play frame "Hint3"
- set mysound to "now" & wnum
- play frame "Hint3.size"
- correctbugs()
- countbugs()
- set afterhint to "main"
- end if
- end if
- end if
- end if
- end
-